source 'https://github.com/bytedance/cocoapods_sdk_source_repo.git'

install! 'cocoapods', 
  :disable_input_output_paths => true,
  :generate_multiple_pod_projects => true,
  :warn_for_multiple_pod_sources => false
platform :ios, '10.0'

# require 'bd_pod_extentions'
# plugin 'cocoapods-bytedance-transform'
# bd_use_app("public")

#use_frameworks!
def common
  pod 'RangersAppLog',:path => '../'
  # pod 'RangersAppLog/Picker','5.1.6-rc.1'
  # pod 'RangersKit', "0.9.1.1-binary", :subspecs => [
  #   "Service",
  #   "Reachability",
  #   "Defaults",
  #   "IDFA",
  #   "Security",
  #   "Foundation",
  #   "Timer",
  #   "Keychain",
  #   "Database",
  #   "Decorator",
  # ]
end
target 'OCDemo' do
  common
end

target 'SwiftDemo' do
  common
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
      end
    end
  end
  ## for generate_multiple_pod_projects = true
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['ENABLE_BITCODE'] = 'NO'
        if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
        end
      end
    end
  end

end

